//
//  WH_AddressCell.m
//  App_6.23
//
//  Created by wanghao on 16/7/21.
//  Copyright © 2016年 wanghao. All rights reserved.
//

#import "WH_AddressCell.h"
#import "WH_Address.h"

@interface WH_AddressCell ()
@property (weak, nonatomic) IBOutlet UILabel *nameL;
@property (weak, nonatomic) IBOutlet UILabel *addressL;

@property (weak, nonatomic) IBOutlet UILabel *phoneL;


@end
@implementation WH_AddressCell


-(void)setMyAddress:(WH_Address *)myAddress
{
    if (_myAddress != myAddress) {
        
        _myAddress = myAddress;
    }
    self.nameL.text = _myAddress.address_name;
    if ([myAddress.address_default isEqualToString:@"1"]) {
        
        self.addressL.text = [NSString stringWithFormat:@"[Default address]%@%@%@",_myAddress.address_country,_myAddress.address_province,_myAddress.address_city];
        [WH_AppTools changeColor:_addressL.text color:[UIColor blueColor] xx:@"[Default address]" nn:_addressL];
    }else{
        
        self.addressL.text = [NSString stringWithFormat:@"%@%@%@",_myAddress.address_country,_myAddress.address_province,_myAddress.address_city];

    }
    self.phoneL.text = _myAddress.address_tel;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
